package com.example.eduservice.controller;

import com.example.common.commonsutils.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.log4j.Log4j2;
import org.springframework.web.bind.annotation.*;

/**
 * @Author:tjf
 * @Description:
 */
@Log4j2
@RestController
@RequestMapping("/eduservice/user")
@Tag(name = "登录控制器")
public class EduLoginController {
    @Operation(description = "根据输入的账户和密码进行登录")
    @PostMapping("/login")
    public R login(){
        return R.ok().data("token", "admin");
    }
    @GetMapping("/info")
    public R info(){
        return R.ok().data("name", "xiaozhang")
                .data("avatar", "https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif")
                .data("roles", "admin");
    }
}
